﻿using Serilog.Configuration;
using Serilog;

namespace DongFangGuoKai.WMSPlatform.WebApi.Extensions.SerilogExtend
{
    public static class LoggerConfigurationExtensions
    {
        /// <summary>
        /// 实现ILogEventEnricher接口
        /// </summary>
        /// <param name="enrichmentConfiguration"></param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException"></exception>
        public static LoggerConfiguration WithCustomInfo(this LoggerEnrichmentConfiguration enrichmentConfiguration)
        {
            if (enrichmentConfiguration == null) throw new ArgumentNullException(nameof(enrichmentConfiguration));
            return enrichmentConfiguration.With<ThreadIdEnricher>();
        }
 
 
    }
}
